package com.sq.universe.system.service;

import com.sq.universe.base.service.BaseService;
import com.sq.universe.system.entity.FileEntity;
import com.sq.universe.system.entity.UserEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;


/**
* @author 孙乾 2021-01-14 22:34:24
*/
public interface FileService extends BaseService<FileEntity> {

    /**
     * 文件上传
     * @param file
     * @param user
     * @param fcId
     * @return
     */
    public FileEntity upload(MultipartFile file, UserEntity user,Integer fcId);

    /**
     * 文件下载
     * @param fileEntity
     * @return
     */
    public byte[] downLoad(FileEntity fileEntity);

    /**
     * 系统生成的文件
     * @param file
     * @param user
     * @param fcId
     * @return
     */
    public FileEntity uploadBySystem(File file, UserEntity user, Integer fcId);

}
